﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using PlaxoSyncWM;

namespace TestPlaxoSyncWM {
    [TestClass]
    public class TestPlaxoLogin {
        private TestContext testContextInstance;
        private PlaxoLogin target;
        public String expectedReponse;

        public TestContext TestContext {
            get { return testContextInstance; }
            set { testContextInstance = value; }
        }

        [TestInitialize]
        public void MyTestPlaxoLogin() {
            target = new PlaxoLogin();
        }

        #region Additional test attributes

        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //

        #endregion

        [TestMethod]
        public void testCheckAccount() {
            if (target != null)
                Assert.IsTrue(target.checkAccount());
        }

        [TestMethod]
        public void testGetPlaxoSettings() {
            string[] vals = target.getPlaxoSettings();
            Assert.AreEqual("kiran.bellubbi@gmail.com", vals[0]);
            Assert.AreEqual("campion", vals[1]);
            Assert.AreEqual("PLXI:01000000000032497763030868604907", vals[2].Replace("\'", ""));
        }
    }
}